#pragma once

/*--------------------------------------------------------------------------*/

struct ERenderTaskFlag
{
	enum Type
	{
	    None						= 0 << 0,
	    Transparent					= 1 << 0,
	    Postprocess					= 1 << 1,
	    LightSource					= 1 << 2,
	    Particles					= 1 << 3,
	    UserInterface				= 1 << 4,
	    NoMaterial					= 1 << 5,
	    SortByDist					= 1 << 6,
	    InvSortByDist				= 1 << 7,
	};
};

/*--------------------------------------------------------------------------*/

struct RenderTaskDesc
{

	const Material* m_material;
	IRender* m_object;
	uint m_argument;
	uint m_flags;
	uint m_priority;

	RenderTaskDesc() :
		m_material(NULL),
		m_object(NULL),
		m_argument(0),
		m_flags(0),
		m_priority(0)
	{

	}
};

/*--------------------------------------------------------------------------*/

class RenderTask
{
public:
	RenderTask(const RenderTaskDesc& renderTaskDesc);
	~RenderTask();

	const Material* GetMaterial() const;
	IRender*		GetObject() const;
	uint	GetArgument() const;
	uint	GetPriority() const;
	void			SetPriority(uint priority);
	uint	GetFlags() const;

private:
	const Material* m_material;
	IRender* m_object;

	uint m_argument;		// z czym do OnRender
	uint m_flags;
	uint m_priority;
};

/*--------------------------------------------------------------------------*/
